package test01;

import java.sql.Connection;

/**
 * @Author czl
 * @Date 2024-04-07
 */
public class MainTest01 {
    public static void main(String[] args) {
        del();
    }

    private static void add(){
        String sql = "insert into staffs(name,age,phone,pos) values (?,?,?,?)" ;
        Connection connection = DbUtil.getConnection();
        SqlRunner sqlRunner = new SqlRunner(connection) ;
        int r = sqlRunner.update(sql, "傻椿", 20, "13417747371", "项目经理");
        System.out.println(r);
    }

    private static void del() {
        String sql = "delete from staffs where id=?" ;
        Connection connection = DbUtil.getConnection();
        SqlRunner sqlRunner = new SqlRunner(connection) ;
        int r = sqlRunner.update(sql, 14);
        System.out.println(r);
    }
}
